package com.thiswhyme.sentinel.server2.feign;

import com.thiswhyme.common.response.ResponseVo;
import com.thiswhyme.sentinel.server2.feign.fallback.UserFeign2ServiceFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 自定义fallback demo
 * Created by thiswhyme on 2020/9/3.
 */
@FeignClient(name = "sentinel-server1", contextId = "biz-demo", fallbackFactory = UserFeign2ServiceFallbackFactory.class)
public interface UserFeign2Service {

    @GetMapping("/user1/user-name")
    ResponseVo<String> queryUserName(@RequestParam("userId") Integer userId);

    @GetMapping("/user1/user-name2")
    ResponseVo<String> queryUserName2(@RequestParam("userId") Integer userId);

    @GetMapping("/user1/user-name3")
    ResponseVo<String> queryUserName3(@RequestParam("userId") Integer userId);
}
